package com.atguigu.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * RabbimtMQListener
 *
 * @Author: 马伟奇
 * @CreateTime: 2021-02-26
 * @Description:
 */
@Component
public class RabbimtMQListener {
    @RabbitListener(queues = "boot_queue")
    public void listenerQueue(Message message) throws Exception{
        System.out.println(new String(message.getBody(),"utf-8"));
    }
}